<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.List"%>
<%@page import="conn.img"%>
<%@page import="com.google.gson.Gson"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<html>
<head>
<link rel="stylesheet" href="css/pintuer.css">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>
<link type="image/x-icon" href="JavaScript:;/favicon.ico" rel="shortcut icon" />
<link href="JavaScript:;/favicon.ico" rel="bookmark icon" />
<title>图片列表</title>
<style type="text/css">
.window0{
			width: 100%;
		}
		.window1{
			width: 936px;
			margin: auto;
		}
		.first{width:200px;height:300px;border:1px solid #02AAF1 ;margin: 20px 15px;float: left;}
		.first img{width: 160px;height: 260px;margin:20px}
		.imgName{text-align: center;}
		.demo-nav.fixed.fixed-top {
				z-index: 8;
				background: #fff;
				width: 100%;
				padding: 0;
				border-bottom: solid 3px #0a8;
				-webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, .175);
				box-shadow: 0 3px 6px rgba(0, 0, 0, .175);
			}
			.active{
				border:1px solid #f00;
			}
</style>
</head>
<body>
	<jsp:useBean id="Connection1" class="conn.Connection1"></jsp:useBean>
	<jsp:setProperty property="*" name="Connection1"/>
	<jsp:useBean id="FindCode" class="conn.Connection1"></jsp:useBean>
	<jsp:include page="header.jsp" flush="true"> <jsp:param name="name" value="value"/> </jsp:include>
	<div id="flag" style="display:none">${flag}</div> 
		<c:if test="${list.size()!=0}" >
			<c:forEach items="${list}" var = "img">
				<div class="window0">
					<div class="window1">
						<div class="first">
							<a href='showDetailsImg?id=${img.id}'>
								<input type=hidden value="${img.id}" />
								<%-- <img src="${img.imgSrc}" onerror="javascript:this.src='http://rqfhis.wolfword.com:10006/testWeb/images/123123123.jpg'" /> --%>
								<img src="${img.imgSrc}"/>
								<div class="imgName">${img.imgOtherName}</div>
							</a>
						</div>
					</div>
				</div>
			</c:forEach>
		</c:if>
		<c:if test="${list.size()==0}" >
				<div class="window0">
					<div class="window1">
						没有找到<span style="color:#f00;">"${keywords}"</span>相关的图片！请重新搜索
					</div>
				</div>
		</c:if>
		<div style="height:30px;clear:both;"></div>
		<div class="window0">
			<div class="window1" style="clear:both;text-align:center;font-size:30px;">
				${bar}
			</div>
		</div>
	<jsp:include page="footer.jsp" flush="true"> <jsp:param name="name" value="value"/> </jsp:include>
</body>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
	function checkFileType(){
		//alert($("#flag").html());
		if($("#flag").html()=='false'){
			alert("文件格式不對,无法上传！");
		}else{
			//alert("文件格式對！");
		}
	}
	if($("#flag").html()){
		checkFileType();
	}
	
	$(document).ready(function(){
		  $(".first").mouseenter(function(){
			$(".first").removeClass("active")
		    $(this).addClass("active");
		  });
		 /*  $(".first").mouseleave(function(){
		    $(this).css("background-color","lightgray");
		  }); */
		});
</script>
</html>